﻿#pragma once

#include <GLFW/glfw3.h>

#include <learn/ais/ais_camera.h>
#include <learn/dll_ext.h>

namespace xi
{

namespace gl
{

inline xi::ais::Camera globalCamera(800, 600);

/**
 * @brief 变换
 *
 * @param[in] window
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void transform(GLFWwindow *window);

/**
 * @brief 窗口尺寸变化回调函数
 *
 * @param[in] window
 * @param[in] width
 * @param[in] height
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWWindowResize(GLFWwindow *window, int width, int height);

/**
 * @brief 鼠标按键回调函数
 *
 * @param[in] window
 * @param[in] button
 * @param[in] action
 * @param[in] mode
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWMouseButtonCallback(GLFWwindow *window, int button, int action, int mode);

/**
 * @brief 鼠标移动回调函数
 *
 * @param[in] window
 * @param[in] xpos
 * @param[in] ypos
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWCursorPosCallback(GLFWwindow *window, double xpos, double ypos);

/**
 * @brief 鼠标滚动回调函数
 *
 * @param[in] window
 * @param[in] xoffset
 * @param[in] yoffset
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWScrollCallback(GLFWwindow *window, double xoffset, double yoffset);

/**
 * @brief 按键回调函数
 *
 * @param[in] window
 * @param[in] key
 * @param[in] scancode
 * @param[in] action
 * @param[in] mods
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWKeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods);

/**
 * @brief 文件拖放回调函数
 *
 * @param[in] window
 * @param[in] path_count
 * @param[in] paths
 * @return EXT_SYMBOL
 */
EXT_SYMBOL void GLFWDropCallback(GLFWwindow *window, int path_count, const char **paths);

} // namespace gl

} // namespace xi
